<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./001call.js"></script>
    <script>
        function add(a,b){
            console.log(this);
            return a+b+this.c
        }
        let obj={
            c:521
        };
        window.c=1314
        console.log(call(add,obj,10,20));  //输出的this是obj了
        console.log(add(10,20)); //输出的this是window
        console.log(call(add,null,10,20));  //null和undefined都指向全局globalThis
    </script>
</body>
</html>